import Http from "@/http";


export function pageApi(params:any){
    return Http.get('privateDevice/charge/page', params)
}

export function chargingApi(deviceId, init){
    return Http.post('privateDevice/charging', {id : deviceId, init})
}

export function detailApi(id){
    return Http.get('privateDevice/charge/detail/' + id)
}

export function stopChargeApi(id){
    return Http.post('charge/stop/private', {id})
}

export function stopChargeResApi(orderId:number) {
    return Http.get('charge/stop/private/res/' + orderId)
}

export function privateChargeResApi(id:number) {
    return Http.get('charge/pres/' + id)
}

export function powerDataApi(id, pageNo:number, pageSize:number) {
    return Http.post('privateDevice/power/data', {id, pageNo, pageSize})
}